﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ASMS.Excel2DbTool
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args == null || args.Length > 2)
            {
                Console.WriteLine("参数不正确!");

            }
            else if (args.Length == 1)
            {
                if (string.Equals(args[0], "haiwaijigoumulu"))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "haiwaijigoumulu");
                    ASMS.Excel2DbTool.Utils.HaiWaiJiGouMuLu.Run(filepath, "data-s5-haiwaijigoumulu.json");
                }
                else if (string.Equals(args[0], "gcwlxtscxmsj", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "gcwlxtscxmsj");
                    ASMS.Excel2DbTool.Utils.GCWLXTSCXMSJ.Run(filepath, "data-s5-gcwlxtscxmsj.json");
                }
                else if (string.Equals(args[0], "项目数据20170207", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, args[0]);
                    ASMS.Excel2DbTool.Utils.项目数据20170207.Run(filepath, "data-s5-gcwlxtscxmsj.json");
                }
                else if (string.Equals(args[0], "仓库数据20170208", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, args[0]);
                    ASMS.Excel2DbTool.Utils.仓库数据20170208.Run(filepath, "data-s3-storage.json");
                }
                else if (string.Equals(args[0], "仓库数据各省仓库数排行", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, args[0]);
                    ASMS.Excel2DbTool.Utils.仓库数据各省仓库数排行.Run(filepath, "s3-province-count-top10.json");
                }
                else if (string.Equals(args[0], "仓库公司仓库面积TOP5", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, args[0]);
                    ASMS.Excel2DbTool.Utils.仓库公司仓库面积TOP5.Run(filepath, "s3-company-area-top10.json");
                }
                else if (string.Equals(args[0], "仓库最多省仓库分布", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "仓库公司仓库面积TOP5");
                    ASMS.Excel2DbTool.Utils.仓库最多省仓库分布.Run(filepath, "s3-map-province-top.json");
                }
                else if (string.Equals(args[0], "仓库数据码头", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, args[0]);
                    ASMS.Excel2DbTool.Utils.仓库数据码头.Run(filepath, "s3-map-mt.json");
                }
                else if (string.Equals(args[0], "仓库数据堆场", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, args[0]);
                    ASMS.Excel2DbTool.Utils.仓库数据堆场.Run(filepath, "s3-map-dc.json");
                }
                else if (string.Equals(args[0], "仓库数据仓库", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "仓库公司仓库面积TOP5");
                    ASMS.Excel2DbTool.Utils.仓库数据仓库.Run(filepath, "s3-map-ck.json");
                }
                else if (string.Equals(args[0], "仓库数据机构", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "仓库数据机构");
                    ASMS.Excel2DbTool.Utils.仓库数据机构.Run(filepath, "s3-map-org.json");
                }
                else if (string.Equals(args[0], "空运航班热力", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "空运航班热力");
                    ASMS.Excel2DbTool.Utils.空运航班热力.Run(filepath, "s4-3-hbrl.json");
                }
                else if (string.Equals(args[0], "空运航班热力V2", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "空运航班热力");
                    ASMS.Excel2DbTool.Utils.空运航班热力V2.Run(filepath, "s4-3-heatmap-hbrl.json");
                }
                else if (string.Equals(args[0], "空运国内网络联程", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "空运国内网络联程");
                    ASMS.Excel2DbTool.Utils.空运国内网络联程.Run(filepath, "s4-3-gnwllc.json");
                }
                else if (string.Equals(args[0], "仓库列表数据", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "仓库列表数据");
                    ASMS.Excel2DbTool.Utils.仓库列表数据.Run(filepath, "s3-4-table.json");
                }
                else if (string.Equals(args[0], "仓库堆场列表数据", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "仓库堆场列表数据");
                    ASMS.Excel2DbTool.Utils.仓库堆场列表数据.Run(filepath, "s3-5-table.json");
                }
                else if (string.Equals(args[0], "s3_4_1_1_dc", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "s3_4_1_1_dc");
                    ASMS.Excel2DbTool.Utils.s3_4_1_1_dc.Run(filepath, "s3_4_1_1_dc.json");
                }
                else if (string.Equals(args[0], "s3_4_1_1_ck", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "s3_4_1_1_ck");
                    ASMS.Excel2DbTool.Utils.s3_4_1_1_ck.Run(filepath, "s3_4_1_1_ck.json");
                }
                else if (string.Equals(args[0], "s3_4_1_1_ck2", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "s3_4_1_1_ck");
                    ASMS.Excel2DbTool.Utils.s3_4_1_1_ck2.Run(filepath, "s3_4_1_1_ck2.json");
                }
                else if (string.Equals(args[0], "s3_4_1_1_mt", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "s3_4_1_1_mt");
                    ASMS.Excel2DbTool.Utils.s3_4_1_1_mt.Run(filepath, "s3_4_1_1_mt.json");
                }
                else if (string.Equals(args[0], "仓库码头列表数据", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "仓库码头列表数据");
                    ASMS.Excel2DbTool.Utils.仓库码头列表数据.Run(filepath, "s3-6-table.json");
                }
                else if (string.Equals(args[0], "仓库组织列表数据", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "仓库组织列表数据");
                    ASMS.Excel2DbTool.Utils.仓库组织列表数据.Run(filepath, "s3-3-table.json");
                }
                else if (string.Equals(args[0], "空运出口目标国家地区货量热力图", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "空运出口目标国家地区货量热力图");
                    ASMS.Excel2DbTool.Utils.空运出口目标国家地区货量热力图.Run(filepath, "s4-4-map.json");
                }
                else if (string.Equals(args[0], "空运数据时间表", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "空运数据时间表");
                    ASMS.Excel2DbTool.Utils.空运数据时间表.Run(filepath, "空运数据时间表.json");
                }
                else if (string.Equals(args[0], "wlzh_jigouxiangxixinxi", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "wlzh_jigouxiangxixinxi");
                    ASMS.Excel2DbTool.Utils.wlzh_jigouxiangxixinxi.Run(filepath, "wlzh_jigouxiangxixinxi.json");
                }
                else if (string.Equals(args[0], "wlzh_jigouxiangxixinxi_v1", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "wlzh_jigouxiangxixinxi_v1");
                    ASMS.Excel2DbTool.Utils.wlzh_jigouxiangxixinxi_v1.Run(filepath, "wlzh_jigouxiangxixinxi_v1.json");
                }
                else if (string.Equals(args[0], "六廊六路", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "六廊六路");
                    ASMS.Excel2DbTool.Utils.六廊六路.Run(filepath, "六廊六路.json");
                }
                else if (string.Equals(args[0], "shandongck", StringComparison.CurrentCultureIgnoreCase))
                {
                    string filepath = string.Format("{0}\\datafiles\\{1}.xlsx", AppDomain.CurrentDomain.BaseDirectory, "shandongck");
                    ASMS.Excel2DbTool.Utils.shandongck.Run(filepath, "shandongck.json");
                }
                
            }
            else
            {
                if (string.Equals(args[0], "wystorage"))
                {
                    string filepath = args[1];
                    ASMS.Excel2DbTool.Utils.WaiyunStorage.Run(filepath);
                }
                else if (string.Equals(args[0], "wystoragearea"))
                {
                    string filepath = args[1];
                    ASMS.Excel2DbTool.Utils.WaiyunStorageArea.Run(filepath);
                }
                else if (string.Equals(args[0], "wystorageareatype"))
                {
                    string filepath = args[1];
                    ASMS.Excel2DbTool.Utils.WaiyunStorageAreaType.Run(filepath);
                }
                else if (string.Equals(args[0], "airline"))
                {
                    string filepath = args[1];
                    ASMS.Excel2DbTool.Utils.WaiyunAirline.Run(filepath);
                }
                else if (string.Equals(args[0], "project"))
                {
                    string filepath = args[1];
                    ASMS.Excel2DbTool.Utils.WaiyunProject.Run(filepath);
                }
            }
            Console.ReadLine();
        }
    }
}
